/**
 * 
 */
package com.acc.softmgr.common.genertor.gen;

import java.util.Date;

import org.apache.velocity.VelocityContext;

import com.acc.softmgr.common.genertor.utils.CodeResourceUtil;
import com.acc.softmgr.common.genertor.utils.CommUtil;
import com.acc.softmgr.common.genertor.utils.PageParserUtil;

/**
 * 
 * @content 生成Service
 * 
 * @date 2017年5月20日
 * 
 * @author OprCalf
 * 
 */
public class GenerateService extends BaseGenerate {

	public static void genService(String tableName, String pckPath, String servicePath) {
		String className = CommUtil.formatTableNameToClassName(tableName);
		VelocityContext context = new VelocityContext();
		context.put("basePackage", CodeResourceUtil.basePackage);
		context.put("createDate", new Date());
		context.put("className", className);
		PageParserUtil.WriterPage(context, "ServiceTemplate.ftl", pckPath, servicePath);
	}
}
